Auto merge of #4400 - behnam:pr4157, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 17 Aug 2017 23:09:50 +0000 (23:09 +0000)
committerbors <bors@rust-lang.org>
Thu, 17 Aug 2017 23:09:50 +0000 (23:09 +0000)
commitd3366336bbeca205ae5187b5a40cbaef8380647b
treefe0dd6214a2b7e584ca38f1e17f1d505e5faa4a9
parent64f4dfd00745428a81b75f65ff9da473ebd5a806
parent6344db0535501aad9de0acd69b9215947bb113b8
Auto merge of #4400 - behnam:pr4157, r=alexcrichton

[check|build|rustc] Add --all-targets option

`cargo check` does not check all targets by default, and to check all,
you need to call it `cargo check --tests --examples --bins --benches`.

Here, we implement `--all-targets` For `check`, `build`, and `rustc`.

For consitency, `--all-targets` is also added to other commands like
`test` although "all targets" is the default behavior.

This is a rebase of <https://github.com/rust-lang/cargo/pull/4157>
src/cargo/ops/cargo_compile.rs